<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
</body>
<script>
    (function () {

        function createXMLHTTPRequest() {
            var xmlHttpRequest;
            if (window.XMLHttpRequest) {
                xmlHttpRequest = new XMLHttpRequest();
                if (xmlHttpRequest.overrideMimeType) {
                    xmlHttpRequest.overrideMimeType("text/xml");
                }
            } else if (window.ActiveXObject) {
                var activexName = [ "MSXML2.XMLHTTP", "Microsoft.XMLHTTP" ];
                for ( var i = 0; i < activexName.length; i++) {
                    try {
                        xmlHttpRequest = new ActiveXObject(activexName[i]);
                        if(xmlHttpRequest){
                            break;
                        }
                    } catch (e) {
                    }
                }
            }
            return xmlHttpRequest;
        }
        function post(url,reqData,calback){
            var req = createXMLHTTPRequest();
            if(req){
                req.open("POST", url, true);
                req.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=gbk;");
                req.send(reqData);
                req.onreadystatechange = function(){
                    if(req.readyState == 4){
                        if(req.status == 200){
                            typeof calback=="function" && callback();
                        }else{
                        }
                    }
                }
            }
        }
        function getOSInfo() {
            var u = navigator.userAgent;
            var obj = {
                OperationSystem: "Windows",
                Browser: "",
                Url: window.location.href,
                Terminal: IsPC()
            };

            function IsPC() {
                var userAgentInfo = navigator.userAgent;
                var Agents = new Array("Android", "iPhone", "SymbianOS", "Windows Phone", "iPad", "iPod");
                var terminal = 'Pc';
                for (var v = 0; v < Agents.length; v++) {
                    if (userAgentInfo.indexOf(Agents[v]) > -1) {
                        terminal = "Mobile";
                        break;
                    }
                }
                return terminal;
            }

            obj.OperationSystem = (u.indexOf("Windows") > -1 && "Windows") || (!!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/) && "Ios") || ((u.indexOf('Android') > -1 || u.indexOf('Linux') > -1) && "Android")
            obj.Browser = (u.indexOf('Trident') > -1 && 'IE') || (u.indexOf('Presto') > -1 && "Opera") || (u.indexOf("Safari") > -1 && u.indexOf("Chrome") == -1 && "Safari") || (u.indexOf('Chrome') && "Chrome") || (u.indexOf('Gecko') && "FireFox");


            var param="";
            for(var i in obj){
                param+=(i+"="+obj[i]+"&");
            }
            return param.substr(0,param.length-1);
        }
        post("/NextEVStatistics",getOSInfo(),function () {});
    })()
</script>
</html>